<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.goodfox.com/jsp/tags/power" prefix="p"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%
request.setAttribute("locale",request.getLocale());
%>
<script type="text/javascript">
</script>

<div class="pageContent" style="border-left: 1px solid #B8D0D6;border-right: 1px solid #B8D0D6;">
	<div class="panelBar">
		<ul class="toolBar">
			<li><span><spring:message code="search.lnkGoModify"/>${account.memName}</span></li>
			<li class="line">line</li>
        	<c:if test="${p:isPower('/account/accountRemove.shtml',sessionScope.loginAccount)}">
			<li><a class="delete" href="<c:url value="/account/accountRemove.shtml"/>?actId=${account.actId}" target="ajax" rel="menuId_20"><span><spring:message code="search.btnRemove"/></span></a></li>
			</c:if>
		</ul>
	</div>
    <form id="accountModifyForm" method="post" action="<c:url value="/account/accountModify.shtml"/>" onsubmit="return validateCallback(this,navTabAjaxDone);">
        <table class="tableForm" cellpadding="0" cellspacing="1" width="100%" align="center">        
            <tbody>
                <tr>
                  	<td>所属机构：</td>
                  	<td>
                        <input type="hidden" name="act_modify_actId" id="act_modify_actId"  value="${account.actId}">
                        <input type="hidden" name="act_modify.orgId" id="act_modify_orgId" value="${account.orgId}">
                        <input class="required" type="text" name="act_modify.orgName" id="act_modify_orgName" value="${account.orgName}" readonly="readonly">
                        <a class="btnLook" href="<c:url value="/account/goOrganizationLookup.shtml"/>" lookupGroup="act_modify">选择所属机构</a>	
		                <a class="btnClean" href="javascript:;" onclick="$('#act_modify_orgId').val('');$('#act_modify_orgName').val('');">清空</a>
                    </td>
                    <td>角色： </td>
                    <td>
                     	<select class="required" id="act_modify_roleId" name="act_modify_roleId">
                     	 	<option value="">--请选择--</option>
							<c:forEach items="${roleList}" var="role" varStatus="index">
								<option value="${role.roleId}" <c:if test="${account.roleId==role.roleId}">selected="selected"</c:if>>${role.roleName}</option>
							</c:forEach>
						</select>
                        <input type="hidden" name="act_modify_roleName" id="act_modify_roleName"/>
                    </td>
                </tr>
                <tr>
                   <td>姓名：</td>
                   <td>
                        <input class="required" type="text" name="act_modify_memName" id="act_modify_memName" value="${account.memName}" maxlength="10">
                   </td>
                   <td>性别：</td>
                   <td>
                        <select id="act_modify_memSex" name="act_modify_memSex">
                        	<option value="">--请选择--</option>
							<c:forEach items="${sexList}" var="atrSex" varStatus="index">
								<option value="${atrSex.atrValue}" <c:if test="${account.memSex==atrSex.atrValue}">selected="selected"</c:if>>${atrSex.atrName}</option>
							</c:forEach>
						</select>
                        <input type="hidden" name="act_modify_sexName" id="act_modify_sexName">
                    </td>
                </tr>
                <tr>
                    <td>移动电话：</td>
                    <td>
                        <input class="phone" type="text" name="act_modify_memMobile" id="act_modify_memMobile" value="${account.memMobile}" maxlength="11">
                    </td>
                    <td>固定电话：</td>
                    <td>
                        <input class="phone" type="text" name="act_modify_memPhone" id="act_modify_memPhone" value="${account.memPhone}"  maxlength="13">
                    </td>
                </tr>
                <tr>
                	<td>身份证：</td>
                    <td colspan="3">
                        <input type="text" name="act_modify_memIdCard" id="act_modify_memIdCard" value="${account.memIdCard}" maxlength="18" >
                    </td>
                </tr>
                <tr>
                    <td>联系地址：</td>
                    <td colspan="3">
                        <input type="text" name="act_modify_memAddress" id="act_modify_memAddress" value="${account.memAddress}" maxlength="40">
                    </td>
                </tr>
                <tr>
                    <td>联系邮编：</td>
                    <td>
                        <input type="text" name="act_modify_memZip" id="act_modify_memZip" value="${account.memZip}" maxlength="6">
                    </td>
                    <td>电子邮箱：</td>
                    <td>
                        <input type="text" name="act_modify_memEmail" id="act_modify_memEmail" value="${account.memEmail}" maxlength="30">
                    </td>
                </tr>
               	<tr>
                	<td>用户名：</td>
                  	<td>${account.actName}</td>
                	<td>密码：</td>
                    <td>
                        <button type="button" onclick="resetPassword('${account.actId}')"><spring:message code="page.btnResetPass"/></button>
                        <script type="text/javascript">
                    		function resetPassword(actId){
								var actPassword = "000000";
								$.ajax({
									type:"post",
									url:"<c:url value="/account/resetPassword.shtml"/>",
									data: {actId:actId,actPassword:actPassword},
						            dataType:"json",
						            success:function(resultData){
						            	alert(resultData.message);
									}
								});
                        	}
                    	</script>
                    </td>
                </tr>
            </tbody>
        </table>
		<div class="panelBar">
            <div class="buttonActive">
        	<c:if test="${p:isPower('/account/accountModify.shtml',sessionScope.loginAccount)}">
            <div class="buttonContent"><button type="submit"><spring:message code="modify.btnModify"/></button></div>
            </c:if>
            </div>
		</div>
    </form>
</div>